<div ng-controller="SystemRoleController" class="container-fluid">
    <div class="row">
        <div class="col-lg-8 col-md-8 col-sm-6">
            <div class="panel panel-default">
                <div class="panel-body">  
                    <form class="form-horizontal">    
                        <label class="col-lg-1 control-label">角色编号</label>
                        <div class="col-lg-2">
                            <input ng-model="queryParams.code" type="text" class="form-control" />
                        </div>
                        <label class="col-lg-1 control-label">角色名称</label>
                        <div class="col-lg-2">
                            <input ng-model="queryParams.name" type="text" class="form-control" />
                        </div>
                        <a class="btn btn-primary btn-search" ng-click="searchRoleGrid()">
                            <i class="fa fa-search"></i> 
                            查询
                        </a>
                        <a class="btn btn-primary btn-search" ng-click="refreshCache()">
                            <i class="fa fa-refresh"></i> 
                            刷新缓存
                        </a>
                    </form>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <grid-pagination option-model="roleGridOptions" edit style="height:380px"></grid-pagination>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <grid-pagination option-model="roleUserGridOptions" edit style="height:479px"></grid-pagination>
                </div>
            </div>
        </div> 
        <div class="col-lg-4 col-md-4 col-sm-6">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <a ladda="saveButton" class="btn btn-primary ladda-button" ng-click="saveRoleMenu()" data-style="expand-right">
                        <i class="fa fa-save"></i> 
                        保存
                    </a>
                    <a class="btn btn-primary" ng-click="collapseAll()">
                        <i class="fa fa-compress"></i> 
                        全部折叠
                    </a>
                    <a class="btn btn-primary" ng-click="expandAll()">
                        <i class="fa fa-expand"></i> 
                        全部展开
                    </a>
                </div>
                <div class="panel-body">
                    <ztree option="menuTreeOption"></ztree>
                </div>
            </div>
        </div>
    </div>
    
    <!-- template -->
    <script type="text/ng-template" id="selectUserDialog">
        <div class="ngdialog-message">
            <div class="panel panel-default">
                <div class="panel-body">  
                    <form class="form-horizontal">    
                        <label class="col-lg-1 control-label">用户编号</label>
                        <div class="col-lg-2">
                            <input ng-model="selectFilterParams.code" type="text" class="form-control" />
                        </div>
                        <label class="col-lg-1 control-label">用户名称</label>
                        <div class="col-lg-2">
                            <input ng-model="selectFilterParams.name" type="text" class="form-control" />
                        </div>
                        <a class="btn btn-primary btn-search" ng-click="searchOtherUserSelectGrid(currentRole.id)">
                            <i class="fa fa-search"></i> 
                            查询
                        </a>
                    </form>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-5">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div ui-grid="otherUserSelectGridOptions" ui-grid-auto-resize ui-grid-selection class="grid table-uigrid" style="height:500px"></div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-1">
                    <div style="margin:200px 16px">
                        <a class="btn btn-primary" ng-click="goLeft()" style="margin-bottom:20px">
                            <i class="fa fa-angle-right"></i>
                        </a>
                        <a class="btn btn-primary" ng-click="goRight()" style="margin-bottom:20px">
                            <i class="fa fa-angle-left"></i>
                        </a>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div ui-grid="roleUserSelectGridOptions" ui-grid-auto-resize ui-grid-selection class="grid table-uigrid" style="height:500px"></div>
                        </div>
                    </div>
                </div>
            </div>          
            <div class="ngdialog-buttons">
                <button type="button" class="ngdialog-button ngdialog-button-secondary" ng-click="closeThisDialog()">取消</button>
                <button type="button" class="ngdialog-button ngdialog-button-primary" ng-click="confirm()">确定</button>
            </div>
        </div>
    </script>
</div>